<!--邀请-->
<template>
  <div class="exp-wrap">
    <p class="exper-tip">选择您需要邀请的角色</p>
    <ul class="myfile-con">
      <li @click="goNext('01')">
        <span class="l-icon"><i class="iconfont icon-hospital"></i>医院</span>
        <i class="iconfont icon-more"></i>
      </li>
      <li @click="goNext('02')">
        <span class="l-icon"><i class="iconfont icon-shopcar1"></i>药店</span>
        <i class="iconfont icon-more"></i>
      </li>
      <li @click="goNext('03')">
        <span class="l-icon"><i class="iconfont icon-distribution"></i>仓管</span>
        <i class="iconfont icon-more"></i>
      </li>
      <li @click="goNext('04')">
        <span class="l-icon"><i class="iconfont icon-ticket"></i>开票员</span>
        <i class="iconfont icon-more"></i>
      </li>
      <li @click="goNext('05')">
        <span class="l-icon"><i class="iconfont icon-manage"></i>业务经理</span>
        <i class="iconfont icon-more"></i>
      </li>
      <li @click="goNext('06')">
        <span class="l-icon"><i class="iconfont icon-courier"></i>配送员</span>
        <i class="iconfont icon-more"></i>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data: function() {
    return {
      
    };
  },
  methods: {
    goNext(index) {
      var id = this.$route.query.id;
      if (id) {
        document.title = "选择角色";
        var url = 'http://' + window.location.host + '/#/user/inviteform?role=' + index + '&id=' + id;
        window.location.href = url;
      } else {
        this.$router.push({
          path: '/user/invitewm',
          query: {
            role: index
          }
        })
      }
    }
  },
  created() {
    document.title = "选择邀请角色"
  }
};
</script>